package com.dhnsoft.数据结构与算法.链表;

import java.util.Stack;

/**
 * ClassName: TestStack
 * Package: com.dhnsoft.数据结构与算法.链表
 * Description:
 *
 * @Author dhn
 * @Create 2024/3/5 10:31
 * @Version 1.0
 */
public class TestStack {
    public static void main(String[] args) {
        Stack<String> stack = new Stack<>();
        stack.add("jack");
        stack.add("tom");
        stack.add("smith");

        while (stack.size()>0){
            System.out.println(stack.pop());//将栈点的数据弹出
        }
    }
}
